<script>
  import Child from "./Child.svelte";
  const handleChildEvent = (e) => {
    // 接收到的数据在e.detail中
    console.log("Parent received event:", e.detail);
  };
</script>

<div>
  <h1>Parent</h1>
  <Child name="Peter" on:childEvent={handleChildEvent}></Child>
</div>
